<?php
@session_start();
include_once 'session_var.php';
if($_SESSION['web']!=true) {
	$_SESSION['languaje'] = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2);
	//header('Location: http://firstclassapartment.com.ar/'.$_SESSION['languaje'].'/gallery.php');
	header('Location: //localhost/firstclassapartmentscordoba/'.$_SESSION['languaje'].'/gallery.php');
}else {
	include("../lang/{$_SESSION['languaje']}.php");
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang=<?php echo $_SESSION['languaje'];?>>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="description" content=<?php echo $gallery_description;?>>
		<meta name="author" content="Pulce Web Solutions - www.pulce.com.ar">
		<!--Para que las páginas se muestren correctamente y el zoom funcione bien en los dispositivos móviles-->
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="keywords" content="<?php echo $index_keywords;?>">

		<title><?php echo $gallery_title;?></title>

		
		<?php
			include_once('links.php');
			include_once("analytics.php");
		?>
		<link type="text/css" rel="stylesheet" href="../css/jquery.galleryview-3.0-dev.css" />
		
		<!--JQUERY-->
		<script src="http://code.jquery.com/jquery-2.1.0.js"></script>
		<!--FUNCTIONS-->
		<script src="../js/functions.js"></script>
		<!-- DROPDOWN -->
		<script src="../js/dropdown.js"></script>
		<!-- MODAL -->
		<script src="../js/modal.js"></script>
		<!-- TRANSITION -->
		<script src="../js/transition.js"></script>
		<!-- BACKSTRECH -->
		<script src="../js/jquery.backstretch.min.js"></script>

		<!-- Second, add the Timer and Easing plugins -->
		<script type="text/javascript" src="../js/jquery.timers-1.2.js"></script>
		<script type="text/javascript" src="../js/jquery.easing.1.3.js"></script>

		<!-- Third, add the GalleryView Javascript and CSS files -->
		<script type="text/javascript" src="../js/jquery.galleryview-3.0-dev.js"></script>
		

		<script type="text/javascript">
			$(document).ready(function(){
				$.ajax({
					url: "../ajax.php?"+a('listArchivos')+c('path','./img/galeria/habitacion1/'),
					dataType: 'json',
					async: false,
					success:function(data){
							var imagenes=[];
							$.each( data, function( key, value ) {
								$('#modalBdr1Body ul').append("<li><img src='../img/galeria/habitacion1/"+value+"'/></li>");
						  	});
					}
				});
				$.ajax({
					url: "../ajax.php?"+a('listArchivos')+c('path','./img/galeria/habitacion2/'),
					dataType: 'json',
					async: false,
					success:function(data){
							var imagenes=[];
							$.each( data, function( key, value ) {
								$('#modalBdr2Body ul').append("<li><img src='../img/galeria/habitacion2/"+value+"'/></li>");
						  	});
					}
				});
				$.ajax({
					url: "../ajax.php?"+a('listArchivos')+c('path','./img/galeria/habitacion3/'),
					dataType: 'json',
					async: false,
					success:function(data){
							var imagenes=[];
							$.each( data, function( key, value ) {
								$('#modalBdr3Body ul').append("<li><img src='../img/galeria/habitacion3/"+value+"'/></li>");
						  	});
					}
				});
				$.ajax({
					url: "../ajax.php?"+a('listArchivos')+c('path','./img/galeria/sanitario/'),
					dataType: 'json',
					async: false,
					success:function(data){
							var imagenes=[];
							$.each( data, function( key, value ) {
								$('#modalTltBody ul').append("<li><img src='../img/galeria/sanitario/"+value+"'/></li>");
						  	});
					}
				});
				$.ajax({
					url: "../ajax.php?"+a('listArchivos')+c('path','./img/galeria/cocina/'),
					dataType: 'json',
					async: false,
					success:function(data){
							var imagenes=[];
							$.each( data, function( key, value ) {
								$('#modalKtcBody ul').append("<li><img src='../img/galeria/cocina/"+value+"'/></li>");
						  	});
					}
				});
				$.ajax({
					url: "../ajax.php?"+a('listArchivos')+c('path','./img/galeria/servicio/'),
					dataType: 'json',
					async: false,
					success:function(data){
							var imagenes=[];
							$.each( data, function( key, value ) {
								$('#modalSrvBody ul').append("<li><img src='../img/galeria/servicio/"+value+"'/></li>");
						  	});
					}
				});

				$('#bdr1').on('click',function(e){
					$('#glrBrd1').galleryView({
						autoplay:true,
					    panel_width: 800, 				//INT - width of gallery panel (in pixels)
						panel_height: 400, 				//INT - height of gallery panel (in pixels)
					});

					$('#modalBdr1').modal('show');
				});
				
				$('#bdr2').on('click',function(e){
					$('#glrBrd2').galleryView({
							autoplay:true,
						    panel_width: 800, 				//INT - width of gallery panel (in pixels)
							panel_height: 400, 				//INT - height of gallery panel (in pixels)
					});

					$('#modalBdr2').modal('show');
				});

				$('#bdr3').on('click',function(e){
					$('#glrBrd3').galleryView({
						autoplay:true,
					    panel_width: 800, 				//INT - width of gallery panel (in pixels)
						panel_height: 400, 				//INT - height of gallery panel (in pixels)
					});	

					$('#modalBdr3').modal('show');
				});

				$('#srv').on('click',function(e){
					$('#glrSrv').galleryView({
						autoplay:true,
					    panel_width: 800, 				//INT - width of gallery panel (in pixels)
						panel_height: 400, 				//INT - height of gallery panel (in pixels)
					});	

					$('#modalSrv').modal('show');
				});
				
				$('#ktc').on('click',function(e){
					$('#glrKtc').galleryView({
						autoplay:true,
					    panel_width: 800, 				//INT - width of gallery panel (in pixels)
						panel_height: 400, 				//INT - height of gallery panel (in pixels)
					});	

					$('#modalKtc').modal('show');
				});

				$('#tlt').on('click',function(e){
					$('#glrTlt').galleryView({
						autoplay:true,
					    panel_width: 800, 				//INT - width of gallery panel (in pixels)
						panel_height: 400, 				//INT - height of gallery panel (in pixels)
					});

					$('#modalTlt').modal('show');
				});
				
			});
		</script>

	</head>
	<body>
		<div id="menu_bar">
				<?php include_once('menu_bar.php');?>
			</div>
		<div class="container">
			
			<div id="backstretch">
				<script>
					// Duration is the amount of time in between slides,
					// and fade is value that determines how quickly the next image will fade in
					$.backstretch([
					"../img/bkgallery.jpg"
					],{duration: 5000,fade:750});
				</script>
			</div>
			<div class="row">
				<div class="col-xs-3">
					<div class="box-central pos-galeria">
						<h1>
							<?php echo $gallery_box_title;?>
						</h1>
						<p id="text-box">
							<?php echo $gallery_box_sub;?>
						</p>
					</div>
				</div>
				<div class="col-xs-9">	
					<img src="../img/plano2.png" class="box-central plano">
					<div class="eff">
						<div class="gallery-img-ktc"><a id="ktc" style="cursor: pointer;"><img class="gallery-icon" src="../img/icon_galeria03.png"/><div class="marco-text-gallery"><span class="text-relieve-gallery"><?php echo $gallery_ktc;?></span></div></a></div>
						<div class="gallery-img-srv"><a id="srv" style="cursor: pointer;"><img class="gallery-icon" src="../img/icon_galeria03.png"/><div class="marco-text-gallery"><span class="text-relieve-gallery"><?php echo $gallery_srv;?></span></div></a></div>
						<div class="gallery-img-tlt"><a id="tlt" style="cursor: pointer;"><img class="gallery-icon" src="../img/icon_galeria03.png"/><div class="marco-text-gallery"><span class="text-relieve-gallery"><?php echo $gallery_tlt;?></span></div></a></div>
						<div class="gallery-img-bdr1"><a id="bdr1" style="cursor: pointer;"><img class="gallery-icon" src="../img/icon_galeria03.png"/><div class="marco-text-gallery"><span class="text-relieve-gallery"><?php echo $gallery_bdr1;?></span></div></a></div>
						<div class="gallery-img-bdr2"><a id="bdr2" style="cursor: pointer;"><img class="gallery-icon" src="../img/icon_galeria03.png"/><div class="marco-text-gallery"><span class="text-relieve-gallery"><?php echo $gallery_bdr2;?></span></div></a></div>
						<div class="gallery-img-bdr3"><a id="bdr3" style="cursor: pointer;"><img class="gallery-icon" src="../img/icon_galeria03.png"/><div class="marco-text-gallery"><span class="text-relieve-gallery"><?php echo $gallery_bdr3;?></span></div></a></div>
					</div>
				</div>
			</div>
		</div>	

		<!-- Modal: modalBdr1 -->
		<div class="modal fade" id="modalBdr1" tabindex="-1" role="dialog" aria-labelledby="lblBdr1" aria-hidden="true">
			<div class="modal-dialog">
		    	<div class="modal-content modal-content-alert">
		      		<div class="modal-header modal-header-alert">
		      			<div class="row">
		      				<div class="col-xs-10">
		      					<h2 class="modal-title" id="lblBdr1"><?php echo $gallery_bdr1;?></h2>
		      				</div>
		      				<div align="right" class="col-xs-2">
		      					<button id="btn-close" type="button" data-dismiss="modal" aria-hidden="true" class="btn btn-danger btn-cerrar-modal">X</button>
		      				</div>
		      			</div>		        		
		       		</div>
		      		<div id="modalBdr1Body" class="modal-body">
			      		<ul id="glrBrd1" class="glr">
						</ul>
					</div>	 
		      	</div>
		    </div>
		</div>

		<!-- Modal: modalBdr2 -->
		<div class="modal fade" id="modalBdr2" tabindex="-1" role="dialog" aria-labelledby="lblBdr2" aria-hidden="true">
			<div class="modal-dialog">
		    	<div class="modal-content">
		      		<div class="modal-content modal-content-alert">
		      		<div class="modal-header modal-header-alert">
		      			<div class="row">
		      				<div class="col-xs-10">
		      					<h2 class="modal-title" id="lblBdr1"><?php echo $gallery_bdr2;?></h2>
		      				</div>
		      				<div align="right" class="col-xs-2">
		      					<button id="btn-close" type="button" data-dismiss="modal" aria-hidden="true" class="btn btn-danger btn-cerrar-modal">X</button>
		      				</div>
		      			</div>		        		
		       		</div>
		       		<div id="modalBdr2Body" class="modal-body">
						<ul id="glrBrd2" class="glr">
						</ul>
					</div>
		      	</div>
		    </div>
		</div>

		<!-- Modal: modalBdr3 -->
		<div class="modal fade" id="modalBdr3" tabindex="-1" role="dialog" aria-labelledby="lblBdr3" aria-hidden="true">
			<div class="modal-dialog">
		    	<div class="modal-content modal-content-alert">
		      		<div class="modal-header modal-header-alert">
		      			<div class="row">
		      				<div class="col-xs-10">
		      					<h2 class="modal-title" id="lblBdr1"><?php echo $gallery_bdr3;?></h2>
		      				</div>
		      				<div align="right" class="col-xs-2">
		      					<button id="btn-close" type="button" data-dismiss="modal" aria-hidden="true" class="btn btn-danger btn-cerrar-modal">X</button>
		      				</div>
		      			</div>		        		
		       		</div>
		      		<div id="modalBdr3Body" class="modal-body">
						<ul id="glrBrd3"  class="glr">
						</ul>
					</div>
		      	</div>
		    </div>
		</div>

		<!-- Modal: modalKtc -->
		<div class="modal fade" id="modalKtc" tabindex="-1" role="dialog" aria-labelledby="lblKtc" aria-hidden="true">
			<div class="modal-dialog">
		    	<div class="modal-content modal-content-alert">
		      		<div class="modal-header modal-header-alert">
		      			<div class="row">
		      				<div class="col-xs-10">
		      					<h2 class="modal-title" id="lblBdr1"><?php echo $gallery_ktc;?></h2>
		      				</div>
		      				<div align="right" class="col-xs-2">
		      					<button id="btn-close" type="button" data-dismiss="modal" aria-hidden="true" class="btn btn-danger btn-cerrar-modal">X</button>
		      				</div>
		      			</div>		        		
		       		</div>
		      		<div id="modalKtcBody" class="modal-body">
					    <ul id="glrKtc" class="glr">
						</ul>
					</div>
		      	</div>
		    </div>
		</div>

		<!-- Modal: modalTlt -->
		<div class="modal fade" id="modalTlt" tabindex="-1" role="dialog" aria-labelledby="lblTlt" aria-hidden="true">
			<div class="modal-dialog">
		    	<div class="modal-content modal-content-alert">
		      		<div class="modal-header modal-header-alert">
		      			<div class="row">
		      				<div class="col-xs-10">
		      					<h2 class="modal-title" id="lblBdr1"><?php echo $gallery_tlt;?></h2>
		      				</div>
		      				<div align="right" class="col-xs-2">
		      					<button id="btn-close" type="button" data-dismiss="modal" aria-hidden="true" class="btn btn-danger btn-cerrar-modal">X</button>
		      				</div>
		      			</div>		        		
		       		</div>
		      		<div id="modalTltBody" class="modal-body">
						<ul id="glrTlt" class="glr">
						</ul>
					</div>
		      	</div>
		    </div>
		</div>

		<!-- Modal: modalSrv -->
		<div class="modal fade" id="modalSrv" tabindex="-1" role="dialog" aria-labelledby="lblSrv" aria-hidden="true">
			<div class="modal-dialog">
		    	<div class="modal-content modal-content-alert">
		      		<div class="modal-header modal-header-alert">
		      			<div class="row">
		      				<div class="col-xs-10">
		      					<h2 class="modal-title" id="lblBdr1"><?php echo $gallery_srv;?></h2>
		      				</div>
		      				<div align="right" class="col-xs-2">
		      					<button id="btn-close" type="button" data-dismiss="modal" aria-hidden="true" class="btn btn-danger btn-cerrar-modal">X</button>
		      				</div>
		      			</div>		        		
		       		</div>
		      		<div id="modalSrvBody" class="modal-body">
		      			<ul id="glrSrv" class="glr">
						</ul>
					</div>
		      	</div>
		    </div>
		</div>


		<div id="footer">
			<?php include("footer.php");?>
		</div>
	</body>
</html>